<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <th:block th:include="include :: header('修改Warframe指令')" />
</head>
<body>
<div class="white-bg">
  <div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-bot-warframe-edit" th:object="${ir}">
      <input name="k" id="k" type="hidden" th:field="*{key}">
      <div class="form-group">
        <label class="col-sm-3 control-label">Value：</label>
        <div class="col-sm-8">
          <div class="input-group">
            <input class="form-control" type="text" id="v" name="v" th:field="*{value}">
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
  const prefix = ctx + "config/warframe/";

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/update", $('#form-bot-warframe-edit').serialize());
    }
  }

  function doSubmit(index, layero){
    const tree = layero.find("iframe")[0].contentWindow.$._tree;
    if ($.tree.notAllowLastLevel(tree)) {
      const body = $.modal.getChildFrame(index);
      $("#k").val(body.find('#k').val());
      $.modal.close(index);
    }
  }
</script>
</body>
</html>